<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <link href="assets/css/bootstrap.min.css" rel="stylesheet" />
 <link rel="stylesheet" href="assets/css/ace.min.css" />
 <link rel="stylesheet" href="assets/css/font-awesome.min.css" />
		<!--[if IE 7]>
		  <link rel="stylesheet" href="assets/css/font-awesome-ie7.min.css" />
		<![endif]-->
 <link rel="stylesheet" href="css/style.css"/>
<title>添加入围信息</title>
</head>

<body>
<div class="page-content">
<!--添加入围信息样式-->
<div class="finalists_style">
 <ul class="add_Info_finalists clearfix">
   <li class="xz_xinxi"><label class="label_name lf">入围供应商名称</label><select name="" size="1" class="mleft">
     <option value="1">供货商公司1</option>
     <option value="2">供货商公司2</option>
     <option value="3">供货商公司3</option>
   </select>
   </li>
    <li class="xz_xinxi"><label class="label_name lf">入围合同有效期</label>
    <ul class="inline date_inline">
                <li class="inline laydate-icon" id="start" style="width:200px;"></li>
                <span >至</span><li class="inline laydate-icon" id="end" style="width:200px;"></li>
            </ul>
    </li>
 </ul>
 <div class="Manager_style">
  <span class="title_name">入围详细</span>
   <table class="table table-striped table-bordered table-hover">
    <thead>
     <th>产品名称</th>
     <th>入围当日价格（元）</th>
     <th>入围当天江苏标杆价（元）</th>
     <th>单位</th>
     <th>联系人</th>
     <th>联系人手机号</th>
     <th>联系人邮箱</th>
    </thead>
    <tbody>
     <tr>
     <td>#0号柴油</td>
     <td><input name="" type="text" /></td>
     <td><input name="" type="text" /></td>
     <td>吨/T</td>
     <td>张小泉</td>
     <td>15463223533</td>
     <td>24533554@sina.com</td>
     </tr>
      <tr>
     <td>#0号柴油</td>
     <td><input name="" type="text" /></td>
     <td><input name="" type="text" /></td>
     <td>吨/T</td>
     <td>张小泉</td>
     <td>15463223533</td>
     <td>24533554@sina.com</td>
     </tr>
    </tbody>
   </table>
 </div>
 <div class="widget-body clearfix">
    <div class="widget-main clearfix">  
        <input multiple type="file" id="id-input-file-3" />
        <!--<label>
            <input type="checkbox" name="file-format" id="id-file-format" class="ace" />
            <span class="lbl"> 只允许图片</span>
        </label>-->
        <button type="button" class="btn Upload_btn">上传文件</button>
    </div>  
</div>
<div class="btn_style"><button type="button" class="btn  btn-danger  save_btn">保存</button> <button type="button" class="btn btn-light Reset_btn">重置</button></div>
</div>

</div>
<script src="assets/js/jquery-1.8.3.min.js" type="text/javascript"></script>
<script src="assets/laydate/laydate.js" type="text/javascript"></script>
<script src="assets/js/ace-elements.min.js"></script>
<script src="assets/js/ace.min.js"></script>
<script>
var start = {
    elem: '#start',
    format: 'YYYY-MM-DD',
    min: laydate.now(), //设定最小日期为当前日期
    max: '2099-06-16 ', //最大日期
    istime: false,
    istoday: false,
    choose: function(datas){
         end.min = datas; //开始日选好后，重置结束日的最小日期
         end.start = datas //将结束日的初始值设定为开始日
    }
};
var end = {
    elem: '#end',
    format: 'YYYY-MM-DD',
    min: laydate.now(),
    max: '2099-06-16',
    istime: false,
    istoday: false,
    choose: function(datas){
        start.max = datas; //结束日选好后，重置开始日的最大日期
    }
};
laydate(start);
laydate(end);

				
				$('#id-input-file-3').ace_file_input({
					style:'well',
					btn_choose:'请选择你要上传的文件',
					btn_change:null,
					no_icon:'icon-cloud-upload',
					droppable:true,
					thumbnail:'small'//large | fit
					,icon_remove:null//set null, to hide remove/reset button
					/**,before_change:function(files, dropped) {
						//Check an example below
						//or examples/file-upload.html
						return true;
					}*/
					/**,before_remove : function() {
						return true;
					}*/
					,
					preview_error : function(filename, error_code) {
						//name of the file that failed
						//error_code values
						//1 = 'FILE_LOAD_FAILED',
						//2 = 'IMAGE_LOAD_FAILED',
						//3 = 'THUMBNAIL_FAILED'
						//alert(error_code);
					}
			
				}).on('change', function(){
					//console.log($(this).data('ace_input_files'));
					//console.log($(this).data('ace_input_method'));
				});
				//图片上传事件
				$('#id-file-format').removeAttr('checked').on('change', function() {
					var before_change
					var btn_choose
					var no_icon
					if(this.checked) {
						btn_choose = "请选择上传的图片地址";
						no_icon = "icon-picture";
						before_change = function(files, dropped) {
							var allowed_files = [];
							for(var i = 0 ; i < files.length; i++) {
								var file = files[i];
								if(typeof file === "string") {
									//IE8 and browsers that don't support File Object
									if(! (/\.(jpe?g|png|gif|bmp)$/i).test(file) ) return false;
									//alert('请选择正确的图片 ' + btn_choose);
								}
								else {
									var type = $.trim(file.type);
									if( ( type.length > 0 && ! (/^image\/(jpe?g|png|gif|bmp)$/i).test(type) )
											|| ( type.length == 0 && ! (/\.(jpe?g|png|gif|bmp)$/i).test(file.name) )//for android's default browser which gives an empty string for file.type
										) continue;//not an image so don't keep this file
								
								}
								
								allowed_files.push(file);
							}
							if(allowed_files.length == 0) return false;
			
							return allowed_files;
							
						}
						
					}
					else {
						btn_choose = "请选择上传的文件地址";
						no_icon = "icon-cloud-upload";
						before_change = function(files, dropped) {
							return files;
						}
					}
					
					var file_input = $('#id-input-file-3');
					file_input.ace_file_input('update_settings', {'before_change':before_change, 'btn_choose': btn_choose, 'no_icon':no_icon})
					file_input.ace_file_input('reset_input');
				});
</script>
</body>
</html>
